import { BasicColumn, FormSchema } from '/@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '消息标题',
    dataIndex: 'msgTitle',
    width: 140,
  },
  {
    title: '发送内容',
    dataIndex: 'msgContent',
    width: 200,
    // slots: { customRender: 'esContent' },
  },
  {
    title: '接收人',
    dataIndex: 'receiverUser',
    width: 140,
  },
  {
    title: '发送人',
    dataIndex: 'sendUserName',
    width: 140,
  },
  // {
  //   title: '发送次数',
  //   dataIndex: 'esSendNum',
  //   width: 120,
  // },
  {
    title: '消息ID',
    dataIndex: 'msgId',
    width: 120,
    ifShow:false
  },
  
  {
    title: '消息数据类型  ',
    dataIndex: 'msgDataType',
    width: 120,
    ifShow:false
  },
  {
    title: '消息数据ID',
    dataIndex: 'msgDataId',
    width: 120,
    ifShow:false
  },
  {
    title: '消息子数据ID',
    dataIndex: 'msgDataSon',
    width: 120,
    ifShow:false
  },
  
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 140,
  },
  {
    title: '消息状态',
    dataIndex: 'msgState',
    width: 140,
  },
  
  // {
  //   title: '发送方式',
  //   dataIndex: 'esType_dictText',
  //   width: 120,
  // },
];

export const searchFormSchema: FormSchema[] = [
  {
    label: '消息标题',
    field: 'msgTitle',
    component: 'Input',
  },
  {
    label: '消息类型',
    field: 'msgType',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'msgSendStatus',
    },
  },
  // {
  //   label: '发送方式',
  //   field: 'esType',
  //   component: 'JDictSelectTag',
  //   componentProps: {
  //     dictCode: 'messageType',
  //   },
  // },
];

export const formSchemas: FormSchema[] = [
  {
    label: '消息ID',
    field: 'msgId',
    component: 'Input',
    show: false,
  },
  {
    label: '消息标题',
    field: 'msgTitle',
    component: 'Input',
    componentProps: { readOnly: true },
  },
  {
    label: '发送内容',
    field: 'msgContent',
    component: 'InputTextArea',
    componentProps: { readOnly: true },
  },
  // {
  //   label: '发送参数',
  //   field: 'esParam',
  //   component: 'Input',
  //   componentProps: { readOnly: true },
  // },

  {
    label: '接收人',
    field: 'receiverUser',
    component: 'Input',
    componentProps: { readOnly: true },
  },
  // {
  //   label: '发送方式',
  //   field: 'esType',
  //   component: 'JDictSelectTag',
  //   componentProps: { disabled: true, dictCode: 'messageType' },
  // },
  {
    label: '消息数据类型',
    field: 'msgDataType',
    component: 'Input',
    componentProps: { readOnly: true },
  },
  {
    label: '发送状态',
    field: 'msgState',
    component: 'JDictSelectTag',
    componentProps: { disabled: true, dictCode: 'msgSendStatus' },
  },
  // {
  //   label: '发送次数',
  //   field: 'esSendNum',
  //   component: 'Input',
  //   componentProps: { readOnly: true },
  // },
  // {
  //   label: '发送失败原因',
  //   field: 'esResult',
  //   component: 'Input',
  //   componentProps: { readOnly: true },
  // },
  {
    label: '备注',
    field: 'remark',
    component: 'InputTextArea',
    componentProps: { readOnly: true },
  },
];
